Skip to content

Fix X509 load locations to handle PEM files with multiple certs#8850

Open
ColtonWilley wants to merge 7 commits intowolfSSL:masterfrom
ColtonWilley:x509_store_pem_multi
Open

Fix X509 load locations to handle PEM files with multiple certs#8850
ColtonWilley wants to merge 7 commits intowolfSSL:masterfrom
ColtonWilley:x509_store_pem_multi

Conversation

@ColtonWilley
Copy link
Copy Markdown
Contributor

Description

wolfSSL_X509_load_locations() previously did not handle PEM files with multiple certs in one file, only the first cert would be loaded. Modify wolfSSL_X509_load_locations() to fix this by using existing logic in x509.c to loop over the PEM headers and load each item, cert or CRL.

Fixes zd 19835

Checklist

  • added tests

@ColtonWilley
Copy link
Copy Markdown
Contributor Author

ColtonWilley commented Jun 6, 2025

Retest this please.

Found unhandled hudson.remoting.RequestAbortedException exception:
java.io.IOException: Unexpected EOF

Comment thread tests/api.c Outdated
Comment thread tests/api.c Outdated
Comment thread src/x509_str.c
Copy link
Copy Markdown
Member

@julek-wolfssl julek-wolfssl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move the new tests and check if the CRL functionality is tested somewhere.

dgarske
dgarske previously approved these changes Jul 3, 2025
SparkiDev
SparkiDev previously approved these changes Jul 7, 2025
julek-wolfssl
julek-wolfssl previously approved these changes Jul 7, 2025
@julek-wolfssl
Copy link
Copy Markdown
Member

@ColtonWilley please rebase to run all the latest tests.

@julek-wolfssl julek-wolfssl removed their assignment Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants